<template>
  <view>
    <image mode="widthFix" :src="url"></image>
  </view>
</template>

<script>
export default {
  data() {
    return {
      image_host: this.image_host,
      url: ""
    };
  },
  onLoad(e) {
    if (parseInt(e.type) === 1) {
      this.url = this.image_host + 'quanzi/role2.png'
    } else if (parseInt(e.type) === 2) {
      this.url = this.image_host + 'template/role3.png'
    } else {
      this.url = this.image_host + 'quanzi/role3.png'
    }
  },
}
</script>

<style lang="scss">
image {
  width: 100%;
}
</style>
